package com.xhwl.data.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xhwl.common.dto.cent.sdata.AccountOrganizationDTO;
import com.xhwl.common.pojo.ResultJson;
import com.xhwl.common.pojo.cent.sdata.AccountOrganization;
import com.xhwl.common.query.cent.sdata.OrganizationQuery;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * @Author: JCccc
 * @Description:
 * @Date: Create in 17:10 2020/12/2
 */
@RestController
public interface IAccountOrganizationService extends IService<AccountOrganization> {


    void deleteBatch(List<AccountOrganization> accountOrganizationList);

	@RequestMapping(value = "/account-organization-service/find-by-account-id", method = RequestMethod.POST)
	List<AccountOrganization> findByAccountId(@RequestPart Integer accountId);

    /**
     * 已出帐号关联的组织信息
     * @param accountOrganizationDTO
     * @return
     */
    ResultJson removeOrg(AccountOrganizationDTO accountOrganizationDTO);

    /**
     * 根据帐号id获取关联的空间id
     * @param accountIds
     * @return
     */
    @RequestMapping(value = "/account-organization-service/group-space-list", method = RequestMethod.POST)
    List<AccountOrganizationDTO> groupSpaceList(@RequestPart List<Integer> accountIds);

    /**
     * 根据空间信息查询关联的帐号
     * @param organizationQuery
     * @return
     */
    @RequestMapping(value = "/account-organization-service/account-ids", method = RequestMethod.POST)
    List<Integer> accountIds(@RequestPart OrganizationQuery organizationQuery);

}
